﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace EntityModel.Migrations
{
    /// <inheritdoc />
    public partial class Init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "EntityBillFare",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false),
                    Cooker = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Price = table.Column<float>(type: "float", nullable: false),
                    Cuisine = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Taste = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddTime = table.Column<DateTime>(type: "datetime(6)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EntityBillFare", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "EntityUser",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    FirstName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastNanme = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Type = table.Column<int>(type: "int", nullable: false),
                    Pay = table.Column<float>(type: "float", nullable: false),
                    Gender = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Age = table.Column<int>(type: "int", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    DimissionTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    HolidayTime = table.Column<DateTime>(type: "datetime(6)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EntityUser", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "EntityUser",
                columns: new[] { "Id", "AddTime", "Age", "DimissionTime", "FirstName", "Gender", "HolidayTime", "LastNanme", "Pay", "Type" },
                values: new object[,]
                {
                    { new Guid("6a29bae5-7fa6-498c-832f-a38df6fa203d"), new DateTime(2025, 4, 9, 8, 10, 48, 769, DateTimeKind.Local).AddTicks(4870), 20, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "李", true, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "四", 2000f, 0 },
                    { new Guid("b069c55e-825d-4954-901d-36368453fce1"), new DateTime(2025, 4, 9, 8, 10, 48, 769, DateTimeKind.Local).AddTicks(4859), 20, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "张", true, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "三", 2000f, 0 }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "EntityBillFare");

            migrationBuilder.DropTable(
                name: "EntityUser");
        }
    }
}
